<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
	<title>Contato</title>
	<link type="text/css" rel="stylesheet"
		href="#{request.contextPath}/css/style.css" />
</h:head>
<h:body>
	<p:ajaxStatus
		onstart="statusDialog.show();javascript:window.location='#content'"
		onsuccess="statusDialog.hide();" />
	<p:dialog showHeader="false" widgetVar="statusDialog" modal="true"
		draggable="false" resizable="false" closable="false">
		<p:graphicImage value="../images/loading.gif" />
	</p:dialog>

	<center>
	<h:form id="form">		
		<h1>Nova mensagem \O/</h1>
		<h:panelGrid columns="1" cellpadding="5">
			<p:messages id="msg"/>
			<h:outputText value="Nome:" />
			<p:inputText value="#{contatoBean.contato.nome}" size="50" maxlength="50" />
			<h:outputText value="Mensagem:" />
			<p:inputTextarea value="#{contatoBean.contato.msg}" maxlength="200" rows="5" cols="50"/>
			<p:commandButton value="Cadastrar" action="#{contatoBean.salvar}" update="@form" />
		</h:panelGrid>
	</h:form>
	</center>
</h:body>
</html>